package day16_Runnable.demo01_Runnable;
//方式二:实现Runnable接口
//定义一个类实现Runnable类
//在类中重写run方法
//创建类的对象
//创建Thread对象,把类的对象作为构造方法的参数
//启动线程
public class Test {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        Thread thread = new Thread(myThread);
        Thread thread1 = new Thread(myThread);
        thread.start();
        thread1.start();
    }
}
